//
//  AppDelegate.swift
//  SinaWeibo
//
//  Created by Apple on 16/5/3.
//  Copyright © 2016年 devshaw. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {


    //可选项的概念: 有可能有值,也有可能没有值
    var window: UIWindow?


    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
   //     print(NSHomeDirectory())
        sleep(2)


        //在程序启动的时候就给他设置颜色
        setAppreance()

        // fatalError("这个是 Swift提供的一个崩溃提示")

        //设置根视图控制器
        window = UIWindow(frame: UIScreen .mainScreen().bounds)
        //成为主窗口并显示
        window?.makeKeyAndVisible()

        window?.rootViewController = YYTabBarViewController()

        return true
    }



    //在程序启动的时候就给他设置颜色
    private func setAppreance(){
        
        //设置渲染颜色
        UINavigationBar.appearance().tintColor = UIColor.orangeColor()

        //通过 UITabBar 的 appearance
        UITabBar.appearance().tintColor = UIColor.orangeColor()
    }

}

